package com.mall4j.cloud.product.service.impl;

import com.mall4j.cloud.product.mapper.SpuExtensionMapper;
import com.mall4j.cloud.product.model.SpuExtension;
import com.mall4j.cloud.product.service.SpuExtensionService;
import com.mall4j.cloud.product.vo.SpuExtensionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商品扩展信息
 *
 * @author JCM
 * @date 2021-04-27 15:33:00
 */
@Service
public class SpuExtensionServiceImpl implements SpuExtensionService {

    @Autowired
    private SpuExtensionMapper spuExtensionMapper;

    @Override
    public SpuExtensionVO getBySpuId(Long spuId) {
        return spuExtensionMapper.getBySpuId(spuId);
    }

    @Override
    public void save(SpuExtension spuExtension) {
        spuExtensionMapper.save(spuExtension);
    }

    @Override
    public void update(SpuExtension spuExtension) {
        spuExtensionMapper.update(spuExtension);
    }

    @Override
    public void deleteBySpuId(Long spuId) {
        spuExtensionMapper.deleteBySpuId(spuId);
    }
}
